"""
#!/usr/bin/python3
# coding:utf-8            
#
# Copyright (C) 2024 - 2024 Jasonakeke， Inc. All Rights Reserved 
# @Desc	   ：
# @Time    : 2024/8/4 17:39
# @Author  : Code_By_Jasonakeke
# @Email   : 2284037977@qq.com
# @File    : 05获取所有路由信息.py
# @IDE     : PyCharm
"""
from flask import Flask
from flask.json import dumps

app = Flask(__name__)


@app.route('/')
def index():
	# rules 就是整个 Web 项目的路由列表
	rules = app.url_map.iter_rules()
	# for rule in rules:
	# 	print('视图函数名称：{}，路由规则：{}'.format(rule.endpoint, rule.rule))
	return dumps({rule.endpoint: rule.rule for rule in rules})

@app.route('/test1')
def test1():
    return ""

@app.route('/test2')
def test2():
    return ""

if __name__ == '__main__':
	app.run(host = '0.0.0.0', port = 5000, debug = True)
